Release 10.1A: OpenEdge Development:
Progress Dynamics Advanced Development
Defining custom SmartLinks and events
In some cases, custom code added to SmartObjects must send an event from one SmartObject to another. If there is just one event type to send, you can define a dynamic SmartLink. To do this, add your own call to the
addLinkprocedure at the appropriate place in your application code, and use the name of the event to be subscribed to, which must be the same as the internal procedure name to be executed when the event occurs. WhenaddLinksees this reference to a link that is not in theSupportedLinkslist for either the source or target object, it registers a singleSUBSCRIBEstatement for the target procedure for an event of the same name as the link and subscribes to the event in the source object. Because there is no predefined object property for the event and nogetorsetfunctions to manage the property value, a support procedure, calledmodifyUserLinks,stores the source and target handles in theADM-DATAprocedure attribute of the two objects so that thelinkHandlesfunction (described later) can return the object handles when they are requested. The exact format of the storage of these handles should not concern the developer. Always use the functions provided to get at these and other ADM values.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |